package youth;

class Human{
    private String name;
    private int age;
    private String gender;
    private String school;
    public Human(String name,int age,String gender,String school){
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.school = school;
    }
    public String getName() {
        return name;
        }
    public int getAge() {
        return age;
        }
    public String getGender()  {
        return gender;
        }
    public String getSchool()  {
        return school;
        }
    public void selfIntro () {
        System.out.println("我的姓名是" + name + ",我的年龄是" + age + ",性别" + gender + ",我的学校是" + school + "。");
    }
};

class Noryouth extends  Human {
    private String job;

    public Noryouth(String name, int age, String gender, String school, String job) {
        super(name, age, gender, school);
        this.job = job;
    }

    @Override
    public void selfIntro() {
        System.out.println("我的姓名是" + getName() + ",我的年龄是" + getAge() + ",性别" + getGender() + ",我的学校是" + getSchool()
                + ",我的工作是" + job + "。");
    }

}
class Artyouth extends Human {
    private String reprework;
    private String dream;

    public Artyouth(String name, int age, String gender, String school, String reprework, String dream) {

        super(name, age, gender, school);
        this.reprework = reprework;
        this.dream = dream;
    }

    @Override
    public void selfIntro() {
        System.out.println("我的姓名是" + getName() + ",我的年龄是" + getAge() + ",性别" + getGender() + ",我的学校是" + getSchool()
                + "我的代表作是" + reprework + "我的梦想是" + dream + "。");
    }
}


public class Test {
    public static void test() {
        Human hm = new Human("小二", 17, "男", "xx大学");
        Noryouth ny = new Noryouth("张三", 18, "女", "xx大学", "学生");
        Artyouth ay = new Artyouth("李四", 19, "男", "xx大学", "《明天》", "歌手");
        hm.selfIntro();
        ny.selfIntro();
        ay.selfIntro();

    }

    public static void main(String[] args) {
        test();
    }
}